package com.ruoyi.web.controller.system;

import com.ruoyi.system.domain.User;
import com.ruoyi.system.service.impl.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

public class UserController {
    @RestController
    @RequestMapping(value = "/CRUD", method = {RequestMethod.GET, RequestMethod.POST})
    public class CRUD {
        @Autowired(required=false)
        private UserService userService;


        @RequestMapping(value = "/insert", method = RequestMethod.POST)
        public User insert(User user) {
            return userService.inserUser(user);
        }

    }
}
